Optimize high-frequency layout updates - #113
Conversation
Coalesce bag and aura update bursts, keep content-only changes local to their owning modules, and reserve full layout passes for downstream footprint changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2cec0c4c-7ea8-4f89-86f4-549413d73fde
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Test Results952 tests +4 952 ✅ +4 2s ⏱️ ±0s Results for commit 658fcca. ± Comparison against base commit 8e47b2f. This pull request removes 81 and adds 85 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Pull request overview
This PR reduces global layout churn during high-frequency update bursts by deferring/coalescing module-owned updates (ExtraIcons bag cooldown reconciliation, ExternalBars aura hooks, BuffBars player auras) and only requesting downstream/global layout when geometry-affecting state changes. It also updates module docs and adds regression coverage around the new deferred update paths.
Changes:
- ExtraIcons: coalesce
BAG_UPDATE_COOLDOWNbursts into one deferred reconciliation; request global layout only when the main viewer footprint changes. - ExternalBars: coalesce viewer
UpdateAurasbursts; apply owner-local layout updates when aura count is unchanged, and request global layout only when count changes. - BuffBars: coalesce player
UNIT_AURAbursts into one deferred owner-local restyle; update docs/architecture notes and add regression tests.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Tests/Modules/ExtraIcons_spec.lua | Adds coverage for deferred bag cooldown reconciliation and footprint-triggered downstream layout requests. |
| Tests/Modules/ExternalBars_spec.lua | Adds coverage for local-only updates on same-count aura changes and burst coalescing behavior. |
| Tests/Modules/BuffBars_spec.lua | Adds coverage for deferred owner-local restyle and timer-driven coalescing of UNIT_AURA bursts. |
| Modules/ExtraIcons.lua | Implements deferred bag cooldown reconciliation and footprint-based downstream layout request gating. |
| Modules/ExternalBars.lua | Implements deferred aura update coalescing plus local-only layout updates when aura count is unchanged. |
| Modules/BuffBars.lua | Implements deferred player aura restyle path and clears pending restyle on disable. |
| docs/ExtraIcons.md | Documents the new coalesced bag cooldown path and footprint-based downstream layout behavior. |
| docs/ExternalBars.md | Documents coalesced aura updates and the same-count local update path. |
| docs/BuffBars.md | Documents the coalesced UNIT_AURA owner-local restyle behavior. |
| docs/ARCHITECTURE.md | Updates event-flow documentation to include the new owner-local coalescing paths. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Discover changed aura keys during owner-local restyles so the spell color options remain current without requiring a global layout. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2cec0c4c-7ea8-4f89-86f4-549413d73fde
Apply the same child setup invariant used by full layouts so early aura events and newly introduced children can be restyled safely. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2cec0c4c-7ea8-4f89-86f4-549413d73fde
Avoid treating the expected early-startup absence of BuffBarCooldownViewer as an enumeration failure. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2cec0c4c-7ea8-4f89-86f4-549413d73fde
Summary
Validation
busted Testsluacheck . -q